﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Text;
using System.IO;
using System.Xml;
using BLL;
using DAL;
using Models;
using System.Data;
using Web.Old_App_Code;


public partial class cn_news_center_news_detail : System.Web.UI.Page
{
    // Fields
    protected ArticleManager am = new ArticleManager();


    // Methods
    protected StringBuilder ArticleBind()
    {
        StringBuilder builder = new StringBuilder();
        try
        {
            builder.AppendLine("<div class=\"article\">");
            if (base.Request.QueryString["id"] != null)
            {
                DataTable articleById = this.am.GetArticleById(Convert.ToInt32(base.Request.QueryString["id"]));
                if (articleById.Rows.Count > 0)
                {
                    DataRow row = articleById.Rows[0];
                    builder.AppendLine("<h1>" + row["articleTilte"] + "</h1>");
                    builder.AppendLine(string.Concat(new object[] { "<span class=\"time\">发布时间：<strong>", row["createTime"], "</strong> 点击率：<strong>", row["clickCount"], "</strong>作者：<strong>", row["author"], "</strong></span>" }));
                    builder.AppendLine("<p>" + row["articleContent"] + "</p>");
                }
            }
            builder.AppendLine("</div>");
        }
        catch
        {
        }
        return builder;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
    }
}
